package com.lingyuan.discounts.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingyuan.common.core.domain.vo.oms.OrderVo;
import com.lingyuan.discounts.domain.Coupon;
import com.lingyuan.discounts.domain.CouponHistory;
import com.lingyuan.discounts.domain.request.CouponHistoryRequest;
import com.lingyuan.discounts.domain.CouponHistoryResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: Li Hao Xuan
 * @name: CouponHistoryMapper
 * @Description TODO
 */
public interface CouponHistoryMapper extends BaseMapper<CouponHistory> {

    List<CouponHistoryResponse> findHistoryList(CouponHistoryRequest couponHistoryRequest);


    List<OrderVo> select(@Param("orderId") Long orderId);

    void addHistory(CouponHistory couponHistory);

    void updHistoryStatus(CouponHistory couponHistory);

    List<Coupon> findCouponId(@Param("id") Long id);

}
